package model

import (
	"time"

	"gorm.io/gorm"
)

type OperationRecordFillAble struct {
	ReqUri    string        `json:"req_uri" gorm:"comment:请求uri"`
	ReqMethod string        `json:"req_method" gorm:"comment:请求方式"`
	ReqIP     string        `json:"req_ip" gorm:"comment:ip"`
	ReqBody   string        `json:"req_body" gorm:"comment:请求包"`
	UserAgent string        `json:"user_agent" gorm:"comment:代理"`
	Resp      string        `json:"resp" gorm:"comment:响应"`
	Status    int           `json:"status" gorm:"comment:状态"`
	Latency   time.Duration `json:"latency" gorm:"comment:延时"`
	ErrMsg    string        `json:"err_msg" gorm:"comment:错误信息"`
	CreatedBy uint          `json:"created_by" gorm:"comment:创建（请求）人"`
}

type OperationRecord struct {
	gorm.Model
	OperationRecordFillAble
}
